import request from '@/utils/request'

/**
 * 获取审批流
 * @param nodeId
 * @returns {AxiosPromise}
 */
export function getFlow(data) {
  return request({
    url: 'approval/flow/getFlow',
    method: 'post',
    data:data
  })
}

/**
 * 添加
 * @param data
 * @returns {AxiosPromise}
 */
export function addFlow(data) {
  return request({
    url: 'approval/flow/add',
    method: 'post',
    data:data
  })
}

/**
 * 用户
 * @returns {AxiosPromise}
 */
export function getEmployees(query) {
  return request({
    url: 'approval/flow/employees',
    method: 'get',
    params:query
  })
}


/**
 * 角色
 * @returns {AxiosPromise}
 */
export function getRoles(query) {
  return request({
    url: 'approval/flow/roles',
    method: 'get',
    params:query
  })
}

/**
 * 条件
 * @returns {AxiosPromise}
 */
export function getSelectCondition() {
  return request({
    url: 'approval/flow/selectCondition',
    method: 'get'
  })
}
